Commands
Here you will find all available commands that can be sent to the server. The list contains some specific EasySightPro® commands.
Basic commands
Sends a raw Asycube command to the connected Asycube (List of valid commands).
Parameters
-
Command - a valid Asycube command
Response
-
200 <Response>
Returns 200, followed by the response from the Asycube if the command was successful.
Example
feeder V?
200 (c) asycube V6.0.0
Returns the value of the parameter that was specified as a command argument. Certain parameters require additional values (List with valid parameters).
Parameters
-
Name (and value)
Response
-
200 <Response>
Returns 200 followed by the value of the specified parameter if the command was successful.
Example
get_parameter state
200 ready
get_parameter timeout
200 30.0
Returns the list of all available programmes.
Parameters
-
None
Response
-
201 <n> <id> '<program_name>', returns 201 followed by <n> lines. Each line consists of the programme number <id> and the programme name <program_name>
Example
get_recipe_list
201 2 1 'Programm Nummer 1'
2 'Programm Nummer 2'
Sets the value of the parameter that was specified as a command argument. Certain parameters require additional values (List with valid parameters).
Parameters
-
Name (and value)
Response
-
200,if the command was successful.
Example
set_parameter timeout 60
200
set_parameter part_quantity 2
200
Starts the station with the desired status and the specified programme number.
Parameters
-
Status: either production, handeye_calibration or purge
-
ID: Valid programme number
Response
200 if the command was successful.
Example
start production 1
200
Stops the current system status of the station. If successful, the operating status is set to Ready.
Parameters
Status: either production, handeye_calibration or purge
Response
-
200 if the command was successful.
Example
stop production
200
get_parameter state
200 ready
Commands for production
The production commands are used for the ongoing operation of the station.
Activates or deactivates image capture. This command prevents image capture if the camera's field of view is not clear.
-
can_take_image false deactivates image acquisition.
-
can_take_image true activates image acquisition.
If the get_part or prepare_part commands are executed, they wait until image acquisition is reactivated or the image acquisition timeout is reached.
Parameters
-
Boolean: entweder true or false
Response
200 if the command was successful.
Standard
-
can_take_image: true
Example
can_take_image true
200
The force_take_image command forces the station to take a new image.
Each time the force_take_image command is executed, an image is taken and an image analysis is performed to find the coordinates of all good candidates. The complete list of previously saved coordinates is replaced. This command ensures the validity of the coordinates of the parts for removal by the robot.
Information: This command should be used during production status if the parts are moving due to known external faults (e.g. removal of parts, movement of the robot or other parts of the system).
Parameters
-
None
Response
-
200 if the command was successful.
Example
force_take_image
200
Requests one or more parts. The number of parts returned can be changed using the part_quantity parameter. This parameter is set to 1 by default.
Information: Please note that changing part_quantity while get_part is in progress does not affect it. Only the subsequent get_part takes the newly set part_quantity into account.
Information: This command blocks the input until the number specified by part_quantity can be found and returned. A timeout of 30 seconds is specified by default. The command returns an error if the requested number of parts cannot be found after the time limit has expired. The timeout can be adjusted before executing get_part (see set_parameter).
Parameters
-
None
Response
-
200 x=<x> y=<y> rz=<rz>, wobei <x>, <y>, <rz> Koordinaten und Orientierung des Teils sind.
Standard functional principle: part_quantity = 1
The command get_part returns the coordinates of a good candidate. This command can be used in various ways:
-
First command execution: If it is the first command execution of the entire production, get_part executes the following:
-
When the command is executed, an image is captured and analysed. If no good part is found, the vibration sequence is started, followed by an image analysis. These two actions are repeated until at least one good part is found.
-
If at least one good part is found, the coordinates of all parts found are saved in a list of good parts. The coordinates of the first part in the list are then sent to the client and deleted from the list.
-
-
Normal operation: If the list of good candidates already contains at least one part, the get_part command sends the coordinates of the first part to the client and then deletes it from the list. No image is captured and no vibration sequence is performed.
-
No further parts: If there are no other parts in the list, the get_part command performs the following steps:
-
When the command is executed, a vibration sequence is started, followed by an image analysis. These two actions are repeated until at least one good part is found.
-
If at least one good part is found, the coordinates of all parts found are saved in a list of good parts. The coordinates of the first part in the list are then sent to the client and deleted from the list.
-
Functional principle with part_quantity = n
This changes the minimum number of good candidates that must be found when executing the get_part command. The number of parts can be changed with the set_parameter command.
The get_part command only stops when at least n good candidates have been found on the Asycube or the timeout has expired.
Information: As soon as the n coordinates have been sent to the client, it is assumed that all these parts will be removed in the next step. This means that the coordinates of the parts are then deleted from the list of good candidates.
Example
get_part
200 x=0.12345 y=0.11111 rz=0.99
set_parameter part_quantity 3
get_part
200 x=0.12345 y=0.11111 rz=0.99 x=3.67890 y=200.45612 rz=1.54 x=120.37000 y=-20.48484 rz=0.00
Prepares one or more parts. Prepared parts can be retrieved later using the get_part command. This command works identically to get_part, except that it does not send the coordinates of the part and has no timeout.
The purpose of this command is to fill the list of good candidates so that the get_part command does not have to take a picture or vibrate the Asycube the next time it is executed. You can execute this command while your robot is performing another task outside the camera's field of view. The aim is to gain time in the production cycle.
Information: This command is normally executed when the robot moves out of the field of view.
The prepare_part command stops when
-
it has been successfully executed.
-
a get_part is sent.
Information: If a can_take_image false is sent, the system waits until a can_take_image true is sent to resume operation.
As with get_part, the number of prepared parts can be changed using the part_quantity parameter. This parameter is set to 1 by default.
Parameters
-
None
Response
-
200, immediately after receiving the command. Processing continues in the background.
Example
set_parameter part_quantity 2
200
prepare_part
200
get_part
200 x=0.12345 y=0.11111 rz=0.99 x=0.45678 y=0.22222 rz=180.01
Automatically calculates the robot's pick-up point. The robot places a component in a defined position and transmits the placement coordinates. The new pick point is calculated using a new image and the transmitted coordinates.
Important: Only one part is allowed on the feeder!
Parameters
-
X Coordinate of the placed part
-
Y Coordinate of the placed part
-
Rotation of the placed part in degrees
Response
-
200 if the command was successful
Example
auto_set_pickpoint 10.5 25.7 90.5
200
Emptying commands
All commands for emptying the Asycube are presented here. Emptying is an option and requires a corresponding purge platform.
Performs a purge sequence, either of the plate only (purge plate) or of both the plate and the hopper (purge full).
This sequence is made up of
-
Opening the flap
-
the triggering of a platform vibration in the corresponding direction
-
(as well as triggering the bunker in the event of a purge full command)
-
Use the camera to check whether the Asycube has already been emptied
-
the closing of the flap
Information: The system must be in purge mode to use this command, see start purge.
Parameters
-
Command either plate or full
-
Duration is an optional parameter that cancels the command once the duration has been reached
Response
-
200 if the command was successful
Example
//Stop previous production
stop production 200
200
//Start purge for programme 1
start puge 1
200
//Perform purge
purge full 15000
200
Commands for robot calibration
All available commands for robot calibration are presented here. This allows the camera-to-robot calibration to be performed automatically.
Calculates the hand-eye calibration from stored camera part coordinates and robot part coordinates.
Before the calibrate command is executed, at least 4 sets of coordinates (camera and robot) must be saved with take_calibration_image and set_calibration_point.
Parameters
-
None
Response
-
200 <Response>, where <Response> indicates the accuracy of the calibration in millimetres if the command was successful.
Information: At least 4 points are required for calibration. The more points, the better the accuracy of the calibration.
Example
calibrate
200 calibration_accuracy=0.42
Returns the robot coordinates of the point with the specified number.
Parameters
-
Number of the robot point to be determined
Response
-
200 x=<x> y=<y>, where <x>, <y> correspond to the coordinates of the saved robot point
Example
start handeye_calibration 1
200
set_calibration_point 1 42 42
200
get_calibration_point 1
200 x=42.00000 y=42.00000
Saves the calibration in the data folder. This command should be executed after calibrate to save the data in the system if the result of the calibration is satisfactory. Once the calibration is saved, it is automatically used in production. If another calibration was previously saved, it will be overwritten by the new calibration.
Parameters
-
None
Response
-
200 if the command was successful
Example
calibrate
200 calibration_accuracy=0.42
save_calibration
200
Saves the new robot coordinate of the point with the specified number. Each coordinate must be transferred in millimetres (mm).
Parameters
-
Number of the robot point to be determined
-
X-coordinate of the robot position
-
Y-coordinate of the robot position
Response
-
200 if the command was successful
Information: Make sure that the robot coordinate system and tool used for recording the robot positions are identical to those used in production.
Example
start handeye_calibration 1
200
set_calibration_point 1 42 42
200
get_calibration_point 1
200 x=42.00000 y=42.00000
Takes an image to determine the current vision coordinates of the detected object. The number of the vision position must match the number of the corresponding robot point. There must be one vision point for each robot point. If more than one part is recognised, the first part recognised on the plate is used as the matching point.
Parameters
-
Number of the point to be determined
Response
-
200 if the command was successful
Example
take_calibration_image 1
200
This command can be used to test the current calibration. An image is taken and the position of the recognised part is output. You can use this to check whether the coordinate output matches the actual coordinate.
Parameters
-
None
Response
-
200 <Response> if the command was successful
-
<Answer> lists the x, y and rz coordinates of all parts found on the disc using the last saved hand-eye calibration. The coordinates of each part found are written to a new line.
-
If several positions are recognised, the response is 201 <n> <Response>
-
Example
calibrate
200 calibration_accuracy=0.42
test_calibration
201 3 x=152.45689 y=-86.33004 rz=158.32
x=1.23231 y=128.89711 rz=-28.09
x=67.89891 y=-28.02956 rz=11.98